<?php
require_once('inc/init.php');
require_once('inc/pager.php');
require_once getCacheFilePath('forums.php');

require_once('inc/editor/ubb.php');

$id=numFilter($_GET['id']);
$row=$db->row_select_one("announces","id={$id}");
if(empty($row)){
	printMsg('announce_noexist');
}
if($row['starttime']>$_SYS['time'] || ($row['stoptime']<$_SYS['time'] && $row['stoptime']>0)){
	printMsg('announce_outdate');
}
$fid=$row['fid'];

$row['title']=htmlFilter($row['title']);
$row['username']=htmlFilter($row['username']);
$row['content']=$ubb->ubb2html($row['content']);
$row['posttime']=getDateStr($row['posttime']);
$row['userurl']=genUrl("user.php?uid={$row['userid']}");
$headtitle=$row['title'];

require_once('header.php');
require_once getTemplatePath('announce.htm');
footer();
?>